/**
* @author Meng Zhang
**/

#pragma once
#include "../SplitterCtrl/SplitterCtrl.h"
class CTextBufferView;
class CSplitterContainer : public SplitterCtrl {
	
	DECLARE_DYNAMIC(CSplitterContainer);
public:
	CSplitterContainer();
	~CSplitterContainer();
	///View Create Helper
	virtual void CreateWnd(CWnd *listener );

	void DestroySplitter();
	int GetBufferCount() const { return wndCount; }
	
	CWnd* GetActiveView();
	CTextBufferView* GetFirstTextView();

	DECLARE_MESSAGE_MAP()
	afx_msg void OnWindowSplit();
	afx_msg void OnWindowSplitVertical();
	afx_msg BOOL OnTextBufferSplit(UINT id, NMHDR * pNotifyStruct, LRESULT * result);

private:
	bool isHorizontal;
	int wndCount;	
	CWnd* wnd[2];

//public:
//	virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
};
